package com.nisure.common;

import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
 * 调用远程接口工具类
 * @author 卓小建    2017年8月21日
 */
public class GetRemoteApiUtils {

	@SuppressWarnings({ "unchecked", "resource" })
	public static <T> T getRemoteService(Class<T> EntityService, String strBean) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		T t = (T) context.getBean(strBean);
		return t;
	}
	
}
